{% extends "mturk/base_app.html" %}

{% block subtitle %}Worker dashboard ({{worker.worker}}) | {% endblock %}

{% block subbranding %}Worker dashboard ({{worker.worker}}) | {% endblock %}

{% block extrahead %}
    <script language="javascript" src="/code/js/bluff/js-class.js" type="text/javascript"></script>
    <script language="javascript" src="/code/js/bluff/bluff.js" type="text/javascript"></script>
    <script language="javascript" src="/code/js/bluff/excanvas.js" type="text/javascript"></script>

{% endblock %}

{% block onload_feature %}

   var g = new Bluff.Line('times_graph', 400);

  // Set theme and options
  g.theme_keynote();
  g.title = 'Timing of submissions';

  // Add data and labels
  var subm=[
{% for t in times %}{{t}}, {% endfor %}
  ];
  g.data('Time per submission',subm); 

  // Render the graph
  g.draw();

{% endblock %}

{% block content %}

{{session.code}}<br/>
Average time per submission: {{average_time}} seconds<br/>
<hr/>

<canvas id='times_graph'>

{% endblock %}
